home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat1 / csplit.z / csplit
Encoding:
Text File  |  1998-10-20  |  8.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ccccsssspppplllliiiitttt((((1111))))                                                            ccccsssspppplllliiiitttt((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_ssss_pppp_llll_iiii_tttt - context split
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _cccc_ssss_pppp_llll_iiii_tttt [_----_ssss] [_----_kkkk] [_----_ffff _p_r_e_f_i_x] [_----_nnnn _n_u_m_b_e_r] _f_i_l_e _a_r_g_1 [... _a_r_g_n]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _cccc_ssss_pppp_llll_iiii_tttt reads _f_i_l_e and separates it into _n+1 sections, defined by the
  16.      arguments _a_r_g_1..._a_r_g_n.  By default the sections are placed in _xxxx_xxxx_0000_0000..._xxxx_xxxx_n
  17.      (_n may not be greater than 99).  These sections get the following pieces
  18.      of _f_i_l_e:
  19.  
  20.        00:   From the start of _f_i_l_e up to (but not including) the line
  21.              referenced by _a_r_g_1.
  22.        01:   From the line referenced by _a_r_g_1 up to the line referenced by
  23.              _a_r_g_2.
  24.  
  25.              _....
  26.  
  27.              _....
  28.  
  29.              _....
  30.        _n:    From the line referenced by _a_r_g_n to the end of _f_i_l_e.
  31.  
  32.      If the _f_i_l_e argument is a _----, then standard input is used.
  33.  
  34.      _cccc_ssss_pppp_llll_iiii_tttt processes supplementary code set characters, and recognizes
  35.      supplementary code set characters in the _p_r_e_f_i_x given to the _----_ffff option
  36.      (see below) according to the locale specified in the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE environment
  37.      variable (see _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)).  In regular expressions, pattern
  38.      searches are performed on characters, not bytes, as described on _eeee_dddd(1).
  39.  
  40.      The options to _cccc_ssss_pppp_llll_iiii_tttt are:
  41.  
  42.        _----_ssss        _cccc_ssss_pppp_llll_iiii_tttt normally prints the number of bytes in each file
  43.                  created.  If the _----_ssss option is present, _cccc_ssss_pppp_llll_iiii_tttt suppresses the
  44.                  printing of all byte counts.
  45.  
  46.        _----_kkkk        _cccc_ssss_pppp_llll_iiii_tttt normally removes created files if an error occurs.  If
  47.                  the _----_kkkk option is present, _cccc_ssss_pppp_llll_iiii_tttt leaves previously created
  48.                  files intact.
  49.  
  50.        _----_ffff _p_r_e_f_i_x If the _----_ffff option is used, the created files are named
  51.                  _p_r_e_f_i_x_0000_0000_...._...._...._p_r_e_f_i_x_n.  The default is _xxxx_xxxx_0000_0000..._xxxx_xxxx_n.
  52.                  Supplementary code set characters may be used in _p_r_e_f_i_x.
  53.  
  54.        _----_nnnn _n_u_m_b_e_r Use _n_u_m_b_e_r decimal digits to form filenames for the file
  55.                  pieces.  The default is 2.
  56.  
  57.      The arguments (_a_r_g_1..._a_r_g_n) to _cccc_ssss_pppp_llll_iiii_tttt can be a combination of the
  58.      following:
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccsssspppplllliiiitttt((((1111))))                                                            ccccsssspppplllliiiitttt((((1111))))
  71.  
  72.  
  73.  
  74.        /_r_e_x_p/    A file is to be created for the section from the current line
  75.                  up to (but not including) the line containing the regular
  76.                  expression _r_e_x_p.  The line containing _r_e_x_p becomes the
  77.                  current line.  This argument may be followed by an optional _++++
  78.                  or _---- some number of lines (for example, _////_PPPP_aaaa_gggg_eeee_////_----_5555).  See _eeee_dddd(1)
  79.                  for a description of how to specify a regular expression.
  80.  
  81.        %_r_e_x_p%    This argument is the same as /_r_e_x_p/, except that no file is
  82.                  created for the section.
  83.  
  84.        _l_n_n_o      A file is to be created from the current line up to (but not
  85.                  including) _l_n_n_o.  _l_n_n_o becomes the current line.
  86.  
  87.        {_n_u_m}     Repeat argument.  This argument may follow any of the above
  88.                  arguments.  If it follows a _r_e_x_p type argument, that argument
  89.                  is applied _n_u_m more times.  If it follows _l_n_n_o, the file will
  90.                  be split every _l_n_n_o lines (_n_u_m times) from that point.
  91.  
  92.      Enclose all _r_e_x_p type arguments that contain blanks or other characters
  93.      meaningful to the shell in the appropriate quotes.  Regular expressions
  94.      may not contain embedded new-lines.  _cccc_ssss_pppp_llll_iiii_tttt does not affect the original
  95.      file; it is the user's responsibility to remove it if it is no longer
  96.      wanted.
  97.  
  98. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  99.           _cccc_ssss_pppp_llll_iiii_tttt _----_ffff _cccc_oooo_bbbb_oooo_llll _ffff_iiii_llll_eeee _''''_////_pppp_rrrr_oooo_cccc_eeee_dddd_uuuu_rrrr_eeee _dddd_iiii_vvvv_iiii_ssss_iiii_oooo_nnnn_////_'''' _////_pppp_aaaa_rrrr_5555_...._//// _////_pppp_aaaa_rrrr_1111_6666_...._////
  100.  
  101.      This example creates four files, _cccc_oooo_bbbb_oooo_llll_0000_0000..._cccc_oooo_bbbb_oooo_llll_0000_3333.  After editing the
  102.      ``split'' files, they can be recombined as follows:
  103.  
  104.           _cccc_aaaa_tttt _cccc_oooo_bbbb_oooo_llll_0000_[[[[_0000_----_3333_]]]] _>>>> _ffff_iiii_llll_eeee
  105.  
  106.      Note that this example overwrites the original file.
  107.  
  108.           _cccc_ssss_pppp_llll_iiii_tttt _----_kkkk _ffff_iiii_llll_eeee _1111_0000_0000 _{{{{_9999_9999_}}}}
  109.  
  110.      This example splits the file at every 100 lines, up to 10,000 lines.  The
  111.      _----_kkkk option causes the created files to be retained if there are less than
  112.      10,000 lines; however, an error message would still be printed.
  113.  
  114.           _cccc_ssss_pppp_llll_iiii_tttt _----_kkkk _pppp_rrrr_oooo_gggg_...._cccc _''''_%%%%_mmmm_aaaa_iiii_nnnn_((((_%%%%_'''' _''''_////_^^^^_}}}}_////_++++_1111_'''' _{{{{_2222_0000_}}}}
  115.  
  116.      If _pppp_rrrr_oooo_gggg_...._cccc follows the normal C coding convention (the last line of a
  117.      routine consists only of a _}}}} in the first character position), this
  118.      example creates a file for each separate C routine (up to 21) in _pppp_rrrr_oooo_gggg_...._cccc.
  119.  
  120. FFFFIIIILLLLEEEESSSS
  121.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS_////_uuuu_xxxx_dddd_ffff_mmmm
  122.           language-specific message file (See _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5).)
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ccccsssspppplllliiiitttt((((1111))))                                                            ccccsssspppplllliiiitttt((((1111))))
  137.  
  138.  
  139.  
  140. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  141.      ed(1), sh(1), regexp(5).
  142.  
  143. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  144.      Self-explanatory except for:
  145.  
  146.           _a_r_g - out of range
  147.  
  148.      which means that the given argument did not reference a line between the
  149.      current position and the end of the file.
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.